package com.enjoyor.soa.traffic.api.dto.collectms;

import com.enjoyor.soa.traffic.util.bean.base.ABean;

import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @ClassName: TreeNodeDto
 * @Description: 树结构实体类.
 * @author yrch 961774545@qq.com
 * @date 2016年4月19日 上午8:59:19
 *
 */
public class TreeNode extends ABean{
	/**  */
	private static final long serialVersionUID = 6391539773675376685L;

	/**
	 * 节点的 id
	 */
	private String id;

	/**
	 * 要显示的节点文本
	 */
	private String text;

	/**
	 * 节点状态，'open' 或 'closed'
	 */
	private String state;

	/**
	 * 指示节点是否被选中
	 */
	private Boolean checked;

	/**
	 * 给一个节点添加的自定义属性
	 */
	private Object attributes;

	/**
	 * 图标CSS样式名
	 */
	private String iconCls;

	/**
	 * 定义了一些子节点的节点数组
	 */
	private List<TreeNode> children = new ArrayList<TreeNode>();

	private Boolean animate = true;

	/**
	 * 中心点X坐标（经度）
	 */
	private double coordX;

	/**
	 * 中心点Y坐标（纬度）
	 */
	private double coordY;

	private String deptRank;
	
	public TreeNode() {
	}

	/**
	 * <p>
	 * Title: 构造函数
	 * </p>
	 * <p>
	 * Description: 实例化EasyUI Tree Node
	 * </p>
	 * 
	 * @param id
	 *            节点的 id
	 * @param text
	 *            要显示的节点文本
	 * @param state
	 *            节点状态，'open' 或 'closed'
	 * @param checked
	 *            指示节点是否被选中
	 * @param attributes
	 *            给一个节点添加的自定义属性
	 */
	public TreeNode(String id, String text, String state, Boolean checked, Boolean animate, Object attributes) {
		this.id = id;
		this.text = text;
		this.state = state;
		this.checked = checked;
		this.animate = animate;
		this.attributes = attributes;
	}

	public TreeNode(String id, String text, String state, Boolean checked, Boolean animate, Object attributes,
			String iconCls) {
		this.id = id;
		this.text = text;
		this.state = state;
		this.checked = checked;
		this.animate = animate;
		this.attributes = attributes;
		this.iconCls = iconCls;
	}

	public TreeNode(String id, String text, String state, Boolean checked, Boolean animate, Object attributes,
			String iconCls, double coordX, double coordY, String deptRank) {
		this.id = id;
		this.text = text;
		this.state = state;
		this.checked = checked;
		this.animate = animate;
		this.attributes = attributes;
		this.iconCls = iconCls;
		this.coordX = coordX;
		this.coordY = coordY;
		this.deptRank = deptRank;
	}

	/**
	 * @Title: Append @Description: 添加子节点 @param node 子节点 @throws
	 */
	public void Append(TreeNode node) {
		this.children.add(node);
	}

	

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public Boolean getChecked() {
		return checked;
	}

	public void setChecked(Boolean checked) {
		this.checked = checked;
	}

	public Object getAttributes() {
		return attributes;
	}

	public void setAttributes(Object attributes) {
		this.attributes = attributes;
	}

	public List<TreeNode> getChildren() {
		return children;
	}

	public void setChildren(List<TreeNode> children) {
		this.children = children;
	}

	/**
	 * @return the animate
	 */
	public Boolean getAnimate() {
		return animate;
	}

	/**
	 * @param animate
	 *            the animate to set
	 */
	public void setAnimate(Boolean animate) {
		this.animate = animate;
	}

	/**
	 * @return the iconCls
	 */
	public String getIconCls() {
		return iconCls;
	}

	/**
	 * @param iconCls
	 *            the iconCls to set
	 */
	public void setIconCls(String iconCls) {
		this.iconCls = iconCls;
	}

	public double getCoordX() {
		return coordX;
	}

	public void setCoordX(double coordX) {
		this.coordX = coordX;
	}

	public double getCoordY() {
		return coordY;
	}

	public void setCoordY(double coordY) {
		this.coordY = coordY;
	}

	public String getDeptRank() {
		return deptRank;
	}

	public void setDeptRank(String deptRank) {
		this.deptRank = deptRank;
	}

}
